//
//  MYMyInvitationHeaderView.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/22.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "MYMyInvitationHeaderView.h"
#import "YLGlobeHeader.h"
#import <Masonry.h>
@implementation MYMyInvitationHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self setUp];
    }
    return self;
}

- (void)setUp
{
    __weak typeof(self) weakSelf = self;
    UILabel *invitedPersonLabel = [self labelWithTitle:@"被邀请人"];
    [invitedPersonLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(weakSelf).mas_offset(5);
        make.bottom.mas_equalTo(weakSelf);
        make.width.mas_equalTo(67);
        make.left.mas_equalTo(weakSelf);
    }];
    
    UILabel *incentiveBondLabel = [self labelWithTitle:@"奖励投资券"];
    [incentiveBondLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(weakSelf).mas_offset(5);
        make.bottom.mas_equalTo(weakSelf);
        make.centerX.mas_equalTo(weakSelf);
    }];
    
    UILabel *timeLabel = [self labelWithTitle:@"时间"];
    [timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(weakSelf).mas_offset(5);
        make.bottom.mas_equalTo(weakSelf);
        make.right.mas_equalTo(weakSelf);
        make.width.mas_equalTo(67);
    }];
    
    
    
}


- (UILabel *)labelWithTitle:(NSString *)title
{
    UILabel *label = [[UILabel alloc] init];
    label.textAlignment = NSTextAlignmentCenter;
    [self addSubview:label];
    label.text = title;
    label.textColor = YLMainColor;
    label.font = [UIFont boldSystemFontOfSize:12.0f];
    return label;
}

@end
